Alone, JAVA applications cannot access libraries and applications in other languages, since the JAVA language does not contain integrated external device support. The JAVA Native Interface (“JNI”) is a standardized native programming interface, which enables JAVA code that is interpreted within a JAVA virtual machine (“JVM”) to interoperate with applications and libraries written in native languages, such as C, C++, assembly, and the like. The JNI is developed, supported, and fully document by Sun Microsystems, Inc. and defined by the JNI Specification (e.g., JNI Specification, Version 1.1, May 1997).
As illustrated in FIG. 1, the JNI serves as the glue between JAVA applications/methods and native applications/methods, enabling an application to operate in both a native language realm and a JAVA language realm. The JNI provides an interface for native methods or applications to create, inspect, and update JAVA objects, call JAVA methods, catch and throw exceptions from a native method and have these exceptions handled in the JAVA application, load JAVA classes and obtain class information, and perform runtime type checking. Correspondingly, JAVA applications may use the JNI to call C routines, use C++ classes, call assembly routines, and the like. A JAVA programmer may need or want to use the JNI in scenarios where the standard JAVA class libraries do not support the platform-dependent features needed by an application, a library is already written in another language and the JAVA programmer wishes to make it accessible to JAVA code without rewriting the library, or the JAVA programmer may wish to implement a small portion of time-critical code in a lower-level language such as Assembly.
While the JNI is a standardized, uniform, well-thought-out interface, it is a fixed interface, which declares a fixed set of functions for interacting between native and JAVA applications. Accordingly, it does not support the ability to add functions to access proprietary, unique, or specialty enhancements of a proprietary JVM.